<?php

/**
 * SiswaHobi form base class.
 *
 * @method SiswaHobi getObject() Returns the current form's model object
 *
 * @package    alazhar
 * @subpackage form
 * @author     Ardhy Widodo
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseSiswaHobiForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'siswa_id'   => new sfWidgetFormInputHidden(),
      'hobi_id'    => new sfWidgetFormInputHidden(),
      'created_at' => new sfWidgetFormDateTime(),
      'updated_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'siswa_id'   => new sfValidatorChoice(array('choices' => array($this->getObject()->get('siswa_id')), 'empty_value' => $this->getObject()->get('siswa_id'), 'required' => false)),
      'hobi_id'    => new sfValidatorChoice(array('choices' => array($this->getObject()->get('hobi_id')), 'empty_value' => $this->getObject()->get('hobi_id'), 'required' => false)),
      'created_at' => new sfValidatorDateTime(),
      'updated_at' => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('siswa_hobi[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'SiswaHobi';
  }

}
